<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>文章管理-新闻信息管理系统</title>
    <link rel="stylesheet" href="view/assets/css/bootstrap.min.css">
    <script src="view/assets/js/html5shiv.min.js"></script>
    <script src="view/assets/js/respond.min.js"></script>
</head>
<style>
    *{
        margin: 0;
        padding: 0;
    }
</style>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" style="margin: auto;" href="index.php">新闻信息管理系统</a>
            <a class="navbar-brand" style="margin: auto; font-size: 15px;" href="admin.php">首页</a>
            <a class="navbar-brand" style="margin: auto; font-size: 15px;" href="artlist.php">文章管理</a>
            <a class="navbar-brand" style="margin: auto; font-size: 15px;" href="catlist.php">分类管理</a>
            <a class="navbar-brand" style="margin: auto;font-size: 15px;" href="commlist.php">评论管理</a>
            <a class="navbar-brand" style="margin: auto; font-size: 15px;" href="role.php">权限管理</a>
            <a class="navbar-brand" style="margin: auto;font-size: 15px;" href="about.php">关于</a>
        </div>
        <!--跳转后台登录按钮-->
        <div id="navbar" class="navbar-collapse collapse">
            <form class="navbar-form navbar-right">
                <a type="button" class="btn btn-success" href="logout.php">退出</a>
            </form>
        </div>
    </div>
</nav>
<!--头部-->
<div class="jumbotron text-center">
    <div style="margin: 20px;">
        <p>新闻信息管理系统</p><p>文章发布</p>
    </div>
</div>
<!--主体部分-->
<div class="container">
    <form action="" method="POST" enctype="multipart/form-data">>
        <div class="row text-center">
            <div class="col-sm-4">
                <div class="page-header">
                    <h3>文章信息</h3>
                </div>
                <!--             输入文章标题  -->
                <div class="panel panel-default">
                    <div class="panel-heading">文章标题</div>
                    <div class="panel-body">
                        <div class="input-group">
                            <input id="title" name="title" type="text" style="left: 50px;" class="form-control text-center" aria-describedby="basic-addon2">
                        </div>
                    </div>
                </div>
                <!--            编辑文章分类-->
                <div class="panel panel-default">
                    <div class="panel-heading">编辑文章分类</div>
                    <div class="panel-body">
                        <select name="cat_id" id="cat_id">
                            <?php foreach($cats as $c){ ?>
                            <option value ="<?php echo $c['cat_id']; ?>"><?php echo $c['cat_name'];?></option>
                            <?php } ?>
                        </select>
                    </div>
                </div>
                <!--            编辑作者信息-->
                <div class="panel panel-default">
                    <div class="panel-heading">编辑作者信息</div>
                    <div class="panel-body">
                        <input id="author" name="author" type="text" style="left: 50px;" class="form-control text-center" aria-describedby="basic-addon2">
                    </div>
                </div>
                <!--            编辑文章标签-->
                <div class="panel panel-default">
                    <div class="panel-heading">编辑文章标签</div>
                    <div class="panel-body">
                        <input id="tag" name="tag" style="left: 250px;" type="text" class="form-control text-center" placeholder="标签之间用,隔开" aria-describedby="basic-addon2">
                    </div>
                </div>
            </div>
            <div class="col-sm-8">
                <div class="page-header">
                    <h3>文章内容</h3>
                </div>
                <div class="alert alert-warning" role="alert">每篇文章可以插入一张图片
                    <input type="file" name="pic" id="pic" accept=".jpeg,.png,.jpg"></div>
                <div class="panel panel-default">
                    <div class="panel-body">
                        <textarea name="content" id="content" style="width: 100%;height:300px;"></textarea>
                    </div>
                </div>
                <input class="btn btn-primary" type="submit" value="发布">
            </div>
        </div>
    </form>
</div>
<!--页尾-->
<div class="jumbotron text-center" style="margin-bottom:0">
    <p>Copyright © 2020-2021 用于数据库实践</p>
</div>
<script src="view/assets/js/jquery.min.js"></script>
<script src="view/assets/js/bootstrap.min.js"></script>
</body>
</html>

